package com.yjt.admin.system.form;

import com.yjt.common.entity.CommonEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * <p>
 * 岗位表
 * </p>
 *
 * @author zzp
 * @since 2021-10-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class PostForm extends CommonEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "岗位id,新增不传")
    private String postId;

    @ApiModelProperty(value = "岗位名称",example = "初级开发")
    @NotBlank(message = "岗位名称不能为空")
    private String postName;


    @ApiModelProperty(value = "岗位类型(1实际0虚拟)",example = "1")
    @NotNull(message = "岗位类型不能为空")
    private Integer postType;

    @ApiModelProperty(value = "所属上级部门")
    private String superOrgId;

    @ApiModelProperty(value = "排序",example = "1")
    @NotNull(message = "排序号不能为空")
    private Integer sort;

    @ApiModelProperty(value = "所属员工id集合")
    @NotEmpty(message = "员工不能为空")
    @Size(message = "至少有一个员工",min = 1)
    private List<String> empIdList;
}
